# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-glanceclient
pkgver=4.1.0
pkgrel=4
pkgdesc="OpenStack Image API Client Library"
arch=('any')
url="https://docs.openstack.org/developer/python-glanceclient"
license=('Apache')
depends=('python-pbr' 'python-prettytable' 'python-keystoneauth1' 'python-requests' 'python-warlock'
         'python-oslo-utils' 'python-oslo-i18n' 'python-wrapt' 'python-pyopenssl')
makedepends=('python-setuptools')
checkdepends=('python-stestr' 'python-ddt' 'python-requests-mock' 'python-testscenarios')
options=('!emptydirs')
source=("https://github.com/openstack/python-glanceclient/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('f39d82ffe2279bf7eaf741d9dcca3678f3f7f064183c6dc5e1849b24d08497335caebaf8a9db2f65b145191f449af79f370c0e0dadb6df6e9801b941a4277756')

export PBR_VERSION=$pkgver

build() {
  cd python-glanceclient-$pkgver
  python setup.py build
}

check() {
  cd python-glanceclient-$pkgver
  stestr run
}

package() {
  cd python-glanceclient-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
